﻿'use strict';

/**
 * Config for the router
 */
var myApp = angular.module("myApp", ['ui.router']);

myApp.config(function ($stateProvider, $urlRouterProvider) {

    $urlRouterProvider.when("", "app");

    $stateProvider.state("app", {
        url: "/app",
        templateUrl: "~/Views/Post/Index.html",
        resolve: loadSequence('IndexPostController', 'postService')
    }).state("app.create", {
        url: "/create",
        templateUrl: "~/Views/User/create.html"
    }).state("app.edit", {
        url: "/edit/:id",
        templateUrl: "~/Views/User/edit.html"
    }).state("app.post", {
        url: "/",
        templateUrl: "~/Views/Post/Index.html"
    }).state("app.post.create", {
        url: "/create",
        templateUrl: "~/Views/Post/create.html"
    }).state("app.post.edit", {
        url: "/edit/:id",
        templateUrl: "~/Views/Post/edit.html"
    });
});